package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.ITemplateScheduleDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.TemplateSchedule;

public class TemplateScheduleDao extends GenericDao implements ITemplateScheduleDao {
	private static final long serialVersionUID = -3476072379399679724L;

	@Override
	@SuppressWarnings("unchecked")
	public List<TemplateSchedule> getAllTemplateSchedule(BasicFilter filter) {
		Criteria criteria = criteriaAllTemplateSchedule(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllTemplateSchedule(BasicFilter filter) {
		return super.criteriaAllBasic(filter, TemplateSchedule.class);
	}	
	
	@Override
	protected String getTableName() {
		return "templateSchedule";
	}
}
